Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 8 - Video Digitizer Components / Video Digitizer Components Reference
Video Digitizer Component Functions / Setting Video Destinations


VDPreflightDestination

You can use the VDPreflightDestination function in your application to verify that a video digitizer component can support a set of destination settings intended for use with the VDSetPlayThruDestination function, which is described in the previous section.

pascal VideoDigitizerError VDPreflightDestination
                                 (VideoDigitizerComponent ci,
                                  Rect *digitizerRect,
                                  PixMapHandle dest, 
                                  Rect *destRect, 
                                  MatrixRecord *m);
ci
Specifies the video digitizer component for the request. Applications obtain this reference from the Component Manager's OpenComponent function.
digitizerRect
Contains a pointer to a rectangle that contains the size and location information for the digitizer rectangle. The coordinates of this rectangle must be relative to the maximum source rectangle. In addition, the digitizer rectangle must be within the maximum source rectangle. For a complete discussion of the relationship between these rectangles, see "About Video Digitizer Components," which begins on page 8-3.
If the video digitizer component cannot accommodate the specified rectangle, it changes the coordinates in this structure to specify a rectangle that it can support and sets the result to qtParamErr.
dest
Contains a handle to the destination pixel map.
destRect
Contains a pointer to a rectangle that specifies the size and location of the video destination. This rectangle must be in the coordinate system of the destination pixel map specified by the dest parameter. If the video digitizer component cannot accommodate this rectangle, it changes the coordinates in the structure to specify a rectangle that it can support and sets the result to qtParamErr.
This is an optional parameter. Applications may specify a transformation matrix to control the placement and scaling of the video image in the destination pixel map. In this case, the destRect parameter is set to nil and the m parameter specifies the matrix.
m
Contains a pointer to a matrix structure containing the transformation matrix for the destination video image. If the video digitizer component cannot accommodate this matrix, it changes the values in the structure to define a matrix that it can support and sets the result to qtParamErr. Applications can determine the capabilities of a video digitizer component by calling the VDGetDigitizerInfo function, described on page 8-24.
This is an optional parameter. Applications may specify a destination rectangle to control the placement and scaling of the video image in the destination pixel map. In this case, the m parameter is set to nil and the destRect parameter specifies the destination rectangle.
If the destRect parameter is nil, you can determine the destination rectangle for simple matrices by calling the TransformRect function using the current digitizer rectangle and this matrix. For more information on TransformRect, see the chapter "Movie Toolbox" in Inside Macintosh: QuickTime.
DESCRIPTION
The application provides the desired settings as parameters to this function. The video digitizer component then examines those settings. If the digitizer component can support the specified settings, it sets the result code to noErr. If the digitizer component cannot support the settings, it alters the input settings to reflect values that it can support and returns a result code of qtParamErr. The application can then use the settings with the VDSetPlayThruDestination function (described in the previous section).

All video digitizer components must support this function.

Applications should use the VDPreflightDestination function to test destination settings whenever the video digitizer component cannot support arbitrary scaling.

RESULT CODES
noErr0No error
qtParamErr-2202Invalid parameter value
SEE ALSO
Applications can determine the capabilities of a video digitizer component by examining the output capability flags (see the discussion of the VDGetCurrentFlags function, which begins on page 8-25, for more information about retrieving these flags). Specifically, if the digiOutDoesStretch and digiOutDoesShrink flags are set to 1 in the output capability flag, the digitizer component supports arbitrary scaling.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help